﻿
#include "MapWidgetGlobalQml.h"
#include "AppSettings.h"
#include "MapModel.h"
#include "../CustomLocationPlugin/QMLControl/MapEngineManager.h"

static MapWidgetGlobalQml* instance = nullptr;

MapWidgetGlobalQml::MapWidgetGlobalQml(QObject *parent)
    : QObject{parent}
    , _appSettings{new AppSettings(this)}
    , _mapModel{new MapModel(this)}
    , _mapEngineManager{new MapEngineManager(this)}
{
    setParent(nullptr);
}


MapWidgetGlobalQml *mapWidgetGlobalQml()
{
    if (instance == nullptr) {
        instance = new MapWidgetGlobalQml();
    }

    return instance;
}
